package br.com.pedido.www;

public class OrdemDeCompraServicoPortTypeProxy implements br.com.pedido.www.OrdemDeCompraServicoPortType {
  private String _endpoint = null;
  private br.com.pedido.www.OrdemDeCompraServicoPortType ordemDeCompraServicoPortType = null;
  
  public OrdemDeCompraServicoPortTypeProxy() {
    _initOrdemDeCompraServicoPortTypeProxy();
  }
  
  public OrdemDeCompraServicoPortTypeProxy(String endpoint) {
    _endpoint = endpoint;
    _initOrdemDeCompraServicoPortTypeProxy();
  }
  
  private void _initOrdemDeCompraServicoPortTypeProxy() {
    try {
      ordemDeCompraServicoPortType = (new br.com.pedido.www.OrdemDeCompraServicoServiceLocator()).getOrdemDeCompraServicoServicePort();
      if (ordemDeCompraServicoPortType != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)ordemDeCompraServicoPortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)ordemDeCompraServicoPortType)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (ordemDeCompraServicoPortType != null)
      ((javax.xml.rpc.Stub)ordemDeCompraServicoPortType)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public br.com.pedido.www.OrdemDeCompraServicoPortType getOrdemDeCompraServicoPortType() {
    if (ordemDeCompraServicoPortType == null)
      _initOrdemDeCompraServicoPortTypeProxy();
    return ordemDeCompraServicoPortType;
  }
  
  public br.com.pedido.www.OrdemDeCompraServicoResponse gerarOrdemDeCompra(br.com.pedido.www.OrdemDeCompraServicoRequest params) throws java.rmi.RemoteException{
    if (ordemDeCompraServicoPortType == null)
      _initOrdemDeCompraServicoPortTypeProxy();
    return ordemDeCompraServicoPortType.gerarOrdemDeCompra(params);
  }
  
  public br.com.pedido.www.AprovarOrdemDeCompraServicoResponse aprovarOrdemDeCompra(br.com.pedido.www.AprovarOrdemDeCompraServicoRequest params) throws java.rmi.RemoteException{
    if (ordemDeCompraServicoPortType == null)
      _initOrdemDeCompraServicoPortTypeProxy();
    return ordemDeCompraServicoPortType.aprovarOrdemDeCompra(params);
  }
  
  public br.com.pedido.www.ListaOrdemCompraBean[] listarOrdemDeCompra(br.com.pedido.www.ListarOrdemDeCompraServicoRequest params) throws java.rmi.RemoteException{
    if (ordemDeCompraServicoPortType == null)
      _initOrdemDeCompraServicoPortTypeProxy();
    return ordemDeCompraServicoPortType.listarOrdemDeCompra(params);
  }
  
  
}